<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
    <title>机构认证</title>
    <link type="image/x-icon" rel="shortcut icon" th:href="@{/img/favicon.png}" />
	<script src="/js/jquery-1.12.0.min.js" type="text/javascript"></script>
	<script src="/js/jquery.tools.js" type="text/javascript"></script>
	<script src="/js/script.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="/css/widget-select.css"/>
    <script src="/tools/echarts/echarts-all.js"></script>
    <script type="text/javascript" src="/tools/pickerDateRange/dateRange.js"></script>
    <script type="text/javascript" src="/tools/pickerDateRange/monthPicker.js"></script>
    <link rel="stylesheet" type="text/css" href="/tools/pickerDateRange/dateRange.css"/>
    <link rel="stylesheet" type="text/css" href="/tools/pickerDateRange/monthPicker.css"/>
    <link rel="stylesheet" type="text/css" href="/tools/jquery.alert/css/jjalert.css"/>
    <link rel="stylesheet" type="text/css" href="/tools/jquery.upload/css/jjupload.css"/>
    <link rel="stylesheet" href="/tools/My97DatePicker/skin/WdatePicker.css" />
    <script src="/tools/jquery.alert/js/jjalert.js"></script>
    <script src="/tools/jquery.upload/js/jjupload.js"></script>
    <script src="/js/jquery.form.js"></script>
    <script src="/tools/formValidator/formValidatorRegex.js"></script>
	<script src="/tools/formValidator/formValidator-4.1.1.js"></script>
	<script src="/tools/My97DatePicker/WdatePicker.js"></script>
    <script src="/tools/ueditor/ueditor.config.js"></script>
    <script src="/tools/ueditor/96ueditor.js"> </script>
    <script src="/tools/ueditor/ueditor.parse.js"> </script>
    <script src="/tools/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script src="/tools/upload/jjupload.js"></script>

	<script src="/tools/jquery.upload/js/iscroll-zoom.js"></script> <!--实现图片的移动-->
	<script src="/tools/jquery.upload/js/hammer.js"></script>
	<script src="/tools/jquery.upload/js/lrz.all.bundle.js"></script>
	<script src="/tools/jquery.upload/js/jquery.photoClip.js"></script> <!--实现图片的剪裁-->
    
</head>
	<body>
	<script >
	/* $('body').append(`
			<div style="
			    position: fixed;
			    width: 1px;
			    top: 0;
			    bottom: 0;
			    left: 609px;
			    background: red;
			"></div>
			`)  */

	/* $('body').append(`<div style="
		    background-image: url(http://localhost:8190/img/zc.jpg);
		    position: fixed;
		    top: 0px;
		    left: 0px;
		    width: 100%;
		    height: 100%;
		"></div>`) */
		
	</script>
		<div class="top">
		<div class="top_bg"></div>
		<div class="top-newlogo"><img src="/img/logo.png"/></div>
		<div class="top-menu">
			<ul class="top-list">
				<li class="top-list-son"><a>机构后台管理</a></li>
			</ul>
		</div>
		<div class="top-group">
			<span class="top-group-btn" th:text="${session.user.name}"></span>
			<span class="top-group-btn"><a href="/v2/login">注销</a></span>
		</div>
	</div>
	
	<div class="schoolcertification-container" id="agencyHtml">
		<h2>机构认证</h2>
		<div class="schoolcertification-title">
			<span class="icon-tip"></span>
			<div class="schoolcertification-title-inner">
				认证成为机构后，您可以在平台上发起比赛，应用享誉业界的完美赛事解决方案。或关联平<br/>台比赛，学生报名时即与机构关联，随时知晓您机构报名情况，整个赛事期间学生都是您行<br/>走的广告牌。
			</div>
		</div>
		<form id="certificationForm"  action="javascript:submitData('certificationForm', 'save_authentication', 'post', 'success')">
			<div class="form-group">
				<label class="form-label-w-113">机构类型：</label>
				<div class="widget-select is-clearfix">
    				<label for="id1">
       				 <input type="radio" name="type" id="id1" checked="checked" value="Work">
			         <div class="bg">
			            <div class="icon icon2"></div>
			            <div class="text">个人工作室</div>
			         </div>
			       </label>
			    <label for="id2">
			        <input type="radio" name="type" id="id2" value="Company">
			        <div class="bg">
			            <div class="icon icon1"></div>
			            <div class="text">企业认证</div>
			        </div>
			    </label>
			    <label for="id3">
			        <input type="radio" name="type" id="id3" value="School">
			        <div class="bg">
			            <div class="icon icon3"></div>
			            <div class="text">学校认证</div>
			        </div>
			    </label>
			</div>
			<div class="p-text"><span style="margin: 0px 4px 0px -12px;color: #FF5001;">*</span>不同的机构类型对应不同的认证提交内容及权限。建议有营业执照的机构选择“企业认证”  ，<br/>无营业执照的机构选择“个人工作室”  ，学校请选择“学校认证”</div>
			</div>
			
			<div class="form-group">
				<label for="agencyDockName" class="form-label-w-113">机构名称：</label>
				<input type="text" id="agencyDockName" name="name" class="input-xlarge-zc changecolor" placeholder=""/>
				<span id="agencyDockNameTip" style="display: inline-block;"></span>
				<div class="p-text  p-2px"><span style="margin: 0px 4px 0px -12px;color: #FF5001;">*</span>请填写1-15字以内的机构名称，一经提交不能修改.</div>
			</div>
			<div class="form-group">
				<label class="form-label-w-113">教学科目：</label>
				<div class="subject-wrapper">
					<div class="title-wrapper">
						<span class="add">添加</span>
					</div>
					<!-- 默认展开 -->
					<div id="taginfo">
						<div class="info-wrapper">
							<div class="info-nav"></div>
							<div class="info-content"></div>
						</div>
						<div class="subject-btn-wrapper">
							<div class="subject-btn">确定</div>
						</div>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label for="" class="form-label-w-113 zc-7px">机构头像：</label>
				<div id="idImg4"  class="zc-img"></div>
				<div class="p-text p-5px"><span style="margin: 0px 4px 0px -12px;color: #FF5001;">*</span>建议使用机构品牌logo作为头像，更具有识别度。尺寸要求：120x120像素</div>
			</div>
				
				
		   <!--  个人工作室 -->
			<div class="form-person-data">
				<div class="form-group">
					<label for="agencyFullName" class="form-label-w-113">机构全称：</label>
					<input type="text" id="agencyFullName" name="fullName" class="input-xlarge-zc changecolor" placeholder=""/>
					<span id="agencyFullNameTip" style="display: inline-block;"></span>
					<div class="p-text "><span style="margin: 0px 4px 0px -12px;color: #FF5001;">*</span>请填写营业执照上名称全称</div>
				</div>
				<div class="form-group">
					<label for=" mailAddress" class="form-label-w-113">机构邮寄地址：</label>
					<input type="text" id="mailAddress" name="mailAddress" class="input-xlarge-zc changecolor" placeholder=""/>
					<span id="mailAddressTip" style="display: inline-block;"></span>
				</div>
				<div class="form-group">
					<label for="registerName" class="form-label-w-113">经营者姓名：</label>
					<input type="text" id="registerName" name="idName" class="input-xlarge-zc changecolor" placeholder=""/>
					<span id="registerNameTip" style="display: inline-block;"></span>
				</div>
				<div class="form-group">
					<label for="registerId" class="form-label-w-113">身份证号码：</label>
					<input type="text" id="registerId" name="idNumber" class="input-xlarge-zc changecolor" placeholder=""/>
					<span id="registerIdTip" style="display: inline-block;"></span>
				</div>
				<div class="form-group">
					<label class="form-label-w-113">身份证证件：</label>
					<div class="certificateType-container">
						<div class="documenttype">
						<div class="certificateType-item">
							<h3>身份证正面照</h3>
							<div class="add-container" id="idImg1"></div>
						</div>
						<div class="certificateType-item">
							<h3>图片示例</h3>
							<div class="add-container"><img src="/img/idcode1.jpg" height="130px"/></div>
						</div>
						</div>
						<hr style=" height:14px;border:none;width:556px;border-top:1px dotted #DBDBDB;" />
						<div class="documenttype">
						<div class="certificateType-item">
							<h3>身份证反面照</h3>
							<div class="add-container" id="idImg2"></div>
						</div>
						<div class="certificateType-item">
							<h3>图片示例</h3>
							<div class="add-container"><img src="/img/idcode2.jpg" height="130px"/></div>
						</div>
						</div>
<!-- 						<hr style=" height:14px;border:none;width:556px;border-top:1px dotted #DBDBDB;" />
						<div class="documenttype">
						<div class="certificateType-item">
							<h3>手持身份证照</h3>
							<div class="add-container" id="idImg3"></div>
						</div>
						<div class="certificateType-item">
							<h3>图片示例</h3>
							<div class="add-container"><img src="/img/idcode3.jpg" height="130px"/></div>
						</div>
						</div> -->
					</div>
				</div>
			</div>
			
			<!-- 企业认证 -->
			<div class="form-company-data" style="display: none;">
				<div class="form-group">
					<label for="companyFullName" class="form-label-w-113">机构全称：</label>
					<input type="text" id="companyFullName" name="fullName2" class="input-xlarge-zc zc-input changecolor" placeholder=""/>
					<span id="companyFullNameTip" style="display: inline-block;"></span>
					<div class="p-text "><span style="margin: 0px 4px 0px -12px;color: #FF5001;">*</span>请填写营业执照上名称全称</div>
				</div>
				<div class="form-group">
					<label for=" mailAddress2" class="form-label-w-113">机构邮寄地址：</label>
					<input type="text" id="mailAddress2" name="mailAddress2"  class="input-xlarge-zc changecolor"  placeholder=""/>
					<span id="mailAddress2Tip" style="display: inline-block;"></span>
				</div>
				<div class="form-group">
					<label for="companyLicenceId" class="form-label-w-113">营业执照注册号：</label>
					<input type="text" id="companyLicenceId" name="licenseNumber2" class="input-xlarge-zc changecolor"  placeholder=""/>
					<span id="companyLicenceIdTip" style="display: inline-block;"></span>
				</div>
				<div class="form-group">
					<label class="form-label-w-113">营业执照扫描件：</label>
					<div class="certificateType-container">
					<div class="documenttype">
						<div class="certificateType-item">
							<h3>营业执照</h3>
							<div class="add-container" id="licenseImg2"></div>
						</div>
						<div class="certificateType-item">
							<h3>图片示例</h3>
							<div class="add-container"><img src="/img/yyzz.jpg" height="130px"/></div>
						</div>
					</div>
					</div>
				</div>
				<div class="form-group">
					<label for="companyBossName" class="form-label-w-113">经营者姓名：</label>
					<input type="text" id="companyBossName" name="idName2" class="input-xlarge-zc changecolor" placeholder=""/>
					<span id="companyBossNameTip" style="display: inline-block;"></span>
				</div>
			</div>
			
			<!-- 学校认证 -->
			<div class="form-school-data" style="display: none;">
				<div class="form-group">
					<label for="companyFullName" class="form-label-w-113">学校全称：</label>
					<input type="text" id="companyFullName3" name="fullName3" class="input-xlarge-zc changecolor" placeholder=""/>
					<span id="companyFullName3Tip" style="display: inline-block;"></span>
					<div class="p-text "><span style="margin: 0px 4px 0px -12px;color: #FF5001;">*</span>请填写执照上名称全称</div>
				</div>
				<div class="form-group">
					<label for="" class="form-label-w-113">学校邮寄地址：</label>
					<input type="text" id="mailAddress3" name="mailAddress3"  class="input-xlarge-zc changecolor" placeholder=""/>
					<span id="mailAddress3Tip" style="display: inline-block;"></span>
				</div>
				<div class="form-group">
					<label for="companyBossName" class="form-label-w-113">经营者姓名：</label>
					<input type="text" id="companyBossName3" name="idName3" class="input-xlarge-zc changecolor" placeholder=""/>
					<span id="companyBossName3Tip" style="display: inline-block;"></span>
				</div>
				<div class="form-group">
					<label class="form-label-w-113">机构类型：</label>
					<label for="bxxk-select" class="form-select">
					   <label for="bxxk-select" class="bxxk-radio radio-tag01"></label>
					   <input id="bxxk-select" class="invisible" type="radio" name="schoolType" value="BXXK" />办学许可证
					</label>
					<label for="zzjg-select" style="margin-left: 40px;" class="form-select">
					  <label for="zzjg-select" class="zzjg-radio radio-tag01"></label>
					  <input id="zzjg-select" class="invisible" type="radio" name="schoolType" value="ZZJG"/>组织机构代码证
					</label>
				</div>
				<div class="form-group">
					<div class="form-group">
						<label for="certificateId" class="form-label-w-113 zc-input zj-sm-lb" >证件号码：</label>
						<input type="text" id="certificateId3" name="licenseNumber3" class="input-xlarge-zc zc-input changecolor" placeholder=""/>
						<span id="certificateId3Tip" style="display: inline-block;"></span>
					</div>
					<label class="form-label-w-113">证件扫描件：</label>
						<div class="certificateType-container">
							<div class="documenttype">
							<div class="certificateType-item">
								<h3 id="saomiaojian">证件照</h3>
								<div class="add-container" id="licenseImg3"></div>
							</div>
							<div class="certificateType-item">
								<h3>图片示例</h3>
								<div class="add-container" id="schoolImg"><img src="/img/schoolImg.jpg" height="130px"/></div>
							</div>
						</div>
					</div>
				</div>
			</div>
			
			
			<div class="form-group">
				<label for="registerTel" class="form-label-w-113">手机号<span style="color: #FF5001;">（此号码同时将作为您机构账号的登陆账号）</span>：</label>
				<input type="text" name="phone" id="registerTel" class="input-xlarge-zc1 changecolor" placeholder=""/>
			</div>
			<div class="form-group">
				<label for="registerCode" class="form-label-w-113">短信验证码：</label>
				<input type="text" name="code" id="register-code" class="input-new-zc changecolor" placeholder=""/>
				<input type="button" id="getRegisterCode" class="input-get" value="获取验证码"/>
			</div>
			
			<div class="form-group">
				<label  class="form-label-w-113  zc-2px" >密码：</label>
				<input type="password" name="password" id="passwd" class="input-xlarge-zc1 changecolor" placeholder="密码是6至20位英文字母或数字"/>
				<span id="passwdTip" style="display: inline-block;"></span>
			</div>
			<div class="form-group">
				<label  class="form-label-w-113 ">确认密码：</label>
				<input type="password" id="passwd2" class="input-xlarge-zc1 changecolor" placeholder=""/>
				<span id="passwd2Tip" style="display: inline-block;"></span>
			</div>
			<div class="form-group">
				<label class="form-label-w-112"></label>
				<input type="submit" id="submit" value="确认提交" class="input-submit-zc"/>
			</div>
		</form>
		
		
		<script type="text/javascript" th:inline="javascript">
		 /*<![CDATA[*/
			var data = /*[[${data}]]*/
			var tags = /*[[${tags}]]*/
			data = eval('('+data+')');
			$(function(){
				var tagIds = ","+data.tags+",";
				$.each(eval(tags),function(i,v){
					if(v.parentId == null){
						var name = $('<span>'+v.name+'</span>');
						$(".info-nav").append(name);
						var itemobj = $('<div class="info-item"></div>');
						$.each(eval(tags),function(i2,v2){
							if(v2.parentId==v.id){
								var item = $('<span>'+v2.name+'</span>');
								item.click(function(){
									if(item.hasClass("active")){
										var tagId = $(".title-wrapper input[name='tagId'][value='"+v2.id+"']");
										if(tagId.length >= 1) {
											tagId.parent().remove();
										}
										item.removeClass("active");	
									} else {
										var acItem = $('<span class="item">'+v2.name+'<i></i><input type="hidden" name="tagId" value="'+v2.id+'"/></span>');
										acItem.find("i").click(function(){
											acItem.remove();
											item.removeClass("active");
										});
										$(".title-wrapper .add").before(acItem);
										item.addClass("active");
									}
								});
								if(tagIds.indexOf(","+v2.id+",")!=-1){
									var acItem = $('<span class="item">'+v2.name+'<i></i><input type="hidden" name="tagId" value="'+v2.id+'"/></span>');
									acItem.find("i").click(function(){
										acItem.remove();
										item.removeClass("active");
									});
									$(".title-wrapper .add").before(acItem);
									item.addClass("active");
								}
								itemobj.append(item);
							}
						});
						name.click(function(){
							$(".info-nav .active").removeClass("active");
							$(".info-content .info-item").removeClass("active");
							$(this).addClass("active");
							itemobj.addClass("active");
						});
						$(".info-content").append(itemobj);
					}
				});
				$(".title-wrapper .add").click(function(){
					$("#taginfo").show();
				});
				$(".subject-btn-wrapper .subject-btn").click(function(){
					$("#taginfo").hide();
				});
				$(".info-wrapper .info-nav span:first").addClass("active");
				$(".info-wrapper .info-content .info-item:first").addClass("active");
				
				var mCount = 60,emailCount=60,
				    PERSONTAG='Work',
				    COMPANYTAG='Company',
				    SCHOOLTAG='School',
				    BXXK='BXXK',
				    ZZJG='ZZJG';
				
				$('.widget-select label').on('click', function(e){
					var index = $(this).index();
					switch(index){
					case 0:
						show(PERSONTAG);
						break;
					case 1:
						show(COMPANYTAG);
						break;
					case 2:
						show(SCHOOLTAG);
						break;     
					default:
					}
				});	
				$('#bxxk-select').parents('.form-select').on('click',function(){
					showSchool(BXXK);
				});
				$('#zzjg-select').parents('.form-select').on('click',function(){
					showSchool(ZZJG);
				});
				
				/*类型选择*/
				function show(tag){
					formValidator(tag);
					tag==PERSONTAG? (function(){
						$('.form-person-data').show();
					})():(function(){
						$('.form-person-data').hide();
					})();
					tag==COMPANYTAG? (function(){
						$('.form-company-data').show()
					})():(function(){
						$('.form-company-data').hide();
					})();
					tag==SCHOOLTAG? (function(){
						$('.form-school-data').show()
					})():(function(){
						$('.form-school-data').hide();
					})();
				};
				function showSchool(tag){
					tag==BXXK? (function(){
						$("#schoolImg img").attr("src", "/img/schoolImg.jpg");
						$("#schoolImg").attr("href", "/img/schoolImg.jpg");
						$("#saomiaojian").html("办学许可证");
						$('.bxxk-radio').addClass('active');
					})():(function(){
						$('.bxxk-radio').removeClass('active');
					})();
					tag==ZZJG? (function(){
						$("#schoolImg img").attr("src", "/img/licenseImg.jpg");
						$("#schoolImg").attr("href", "/img/licenseImg.jpg");
						$("#saomiaojian").html("组织机构代码证");
						$('.zzjg-radio').addClass('active');
					})():(function(){
						$('.zzjg-radio').removeClass('active');
					})();
				};
				function formValidator(tag){//控件校验
					$("#certificationForm input").formValidator({onShow:"",onFocus:"",onCorrect:""}).inputValidator({});
					$("#agencyDockName").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).inputValidator({min:1,max:25,onError:"1-25个字以内"});
					$("#passwd").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).inputValidator({min:6,max:20,onError:"密码是6至20位英文字母或数字"});
	    			$("#passwd2").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).compareValidator({desID:"passwd",operateor:"=",onError:"2次密码不一致,请确认"});
	    			if(tag==PERSONTAG){
		    			$("#agencyFullName").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).inputValidator({min:1,max:50,onError:"50字以内"});
		    			$("#mailAddress").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).inputValidator({min:1,max:50,onError:"50字以内"});
		    			$("input[name='idImg1']").formValidator({onShow:"",onFocus:"",onCorrect:""}).inputValidator({min:1,onError:"身份证正面照必须上传"});
		    			$("input[name='idImg2']").formValidator({onShow:"",onFocus:"",onCorrect:""}).inputValidator({min:1,onError:"身份证反面照必须上传"});
		    			/* $("input[name='idImg3']").formValidator({onShow:"",onFocus:"",onCorrect:""}).inputValidator({min:1,onError:"手持身份证照必须上传"}); */
		    			$("#registerName").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).inputValidator({min:2,max:20,onError:"姓名不正确"});
		    			$("#registerId").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).inputValidator({min:2,max:20,onError:"证件号码不正确"});
	    			} else if(tag==COMPANYTAG){
		    			$("#companyFullName").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).inputValidator({min:1,max:50,onError:"50字以内"});
		    			$("#mailAddress2").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).inputValidator({min:1,max:50,onError:"50字以内"});
		    			$("#companyBossName").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).inputValidator({min:2,max:20,onError:"姓名不正确"});
		    			$("input[name='licenseImg2']").formValidator({onShow:"",onFocus:"",onCorrect:""}).inputValidator({min:1,onError:"营业执照必须上传"});
		    			$("#companyLicenceId").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).inputValidator({min:2,max:50,onError:"证件号码不正确"});
					} else if(tag==SCHOOLTAG){
		    			$("#companyFullName3").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).inputValidator({min:1,max:50,onError:"50字以内"});
		    			$("#mailAddress3").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).inputValidator({min:1,max:50,onError:"50字以内"});
		    			$("#companyBossName3").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).inputValidator({min:1,max:20,onError:"姓名不正确"});
		    			$("input[name='licenseImg3']").formValidator({onShow:"",onFocus:"",onCorrect:""}).inputValidator({min:1,onError:"证件必须上传"});
		    			$("#certificateId3").formValidator({onShow:"",onFocus:"",onCorrect:"",leftTrim:true, rightTrim:true}).inputValidator({min:2,max:50,onError:"证件号码不正确"});
					}
				};

				function countTime() {
					mCount--;
					$('#getRegisterCode').data('isCount', true);
					if(mCount <= 0) {
						$('#getRegisterCode').data('isCount', false);
						$('#getRegisterCode').val('重新获取');
						mCount = 60;
						return;
					}
					$('#getRegisterCode').val(mCount + 's重新获取');
					setTimeout(arguments.callee, 1000);
				};
				
				$("#agencyDockName").val(data.name);
				if(data.name!=null){
					$("#agencyDockName").attr("readonly", "readonly");
				}
				$("input[name='type'][value='"+data.type+"']").prop("checked","checked");
				$("input[name='type'][value='"+data.type+"']").prev().addClass("active");
				$("input[name='schoolType'][value='"+data.schoolType+"']").prop("checked","checked");
				$("input[name='schoolType'][value='"+data.schoolType+"']").prev().addClass("active");
				$("#agencyFullName").val(data.fullName);
				$("#fullName").val(data.fullName);
				$("#mailAddress").val(data.mailAddress);
				$("#registerName").val(data.idName);
				$("#registerId").val(data.idNumber);
				$("#registerTel").val(data.phone);
				if(data.phone!=null) {
					$("#registerTel").attr("readonly", "readonly");
				};
				$("input[name='email']").val(data.email);
				$("#email").val(data.email);
				$("#companyFullName").val(data.fullName);
				$("#mailAddress2").val(data.mailAddress);
				$("#companyBossName").val(data.idName);
				$("#companyLicenceId").val(data.licenseNumber);
				$("#companyFullName3").val(data.fullName);
				$("#mailAddress3").val(data.mailAddress);
				$("#companyBossName3").val(data.idName);
				$("#certificateId3").val(data.licenseNumber);
				
				$("#idImg1").jjUploadClipFile({width:188,height:130,url:data.idImg1});
				$("#idImg2").jjUploadClipFile({width:188,height:130,url:data.idImg2});
				/* $("#idImg3").jjUploadClipFile({width:188,height:130,url:data.idImg3}); */
				$("#idImg4").jjUploadClipFile({width:120,height:120,isClip:true,url:data.idImg4});///LOGO
				$("#licenseImg2").jjUploadClipFile({width:97,height:130,url:data.licenseImg});
				$("#licenseImg3").jjUploadClipFile({width:180,height:130,url:data.licenseImg});

				$('#getRegisterCode').on('click',function(){
					var phone = $("input[name='phone']").val();
					var reg = /^(\+?0?86\-?)?1[345789]\d{9}$/;
					if(!reg.test(phone)) {
						alert("请输入正确的手机号");
						return;
					};
					$(this).css('color','#FFFFFF');
					if($('#getRegisterCode').data('isCount')) return;
					$.ajax({url:"getCode",data:{phone:phone},type:"get",success:function(r){
						if(r.success){
							$("#getRegisterCode").attr("readonly", "readonly");
						} else {
							mCount=0;
							alert(r.msg);
						}
					}});
					countTime();
				});
				$('.changecolor').focus(function() {
		      	    $(this).css('border-color', '#FF6121');
		      	  }).blur(function() {
		      	    $(this).css('border-color', '');
		      	  });
				$.formValidator.initConfig({formID:"certificationForm",debug:false,onError:function(msg){alert(msg)}});
    			show(data.type);
				showSchool(data.schoolType);
			})
		/*]]>*/
		</script>
	</div>